﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IFServerDLL.Model;
using HCY.CTP.DBShangZheng;
using IFClientDLL.MyCalc.CalcData;

namespace IFClientDLL.MyCalc
{
    public enum MyCalcType
    {
        Open,
        Order,
        Trade,
        Command
        
    }
    public interface ICalcBase
    {
        Guid CalcID { get; }

        MyCalcType CalcType { get; }
        string CalcName { get; }
        string CalcDescripte { get; }
    }
    public interface ICalc : ICalcBase
    {
       
        ICalcResult DoCalc(MyIF myif);
        List<MyEnumCalcDataType> CalcDataTypes { get; }
        
    }
    public interface ICalcResult
    {
        bool IsStop { get; }
    }
    public class CalcResultBase : ICalcResult
    {
        public CalcResultBase(bool isStop)
        {
            _IsStop = isStop;
        }
        public CalcResultBase(string msg)
        {
            _msg = msg;
        }

        private string _msg;
        public string ResultMsg
        {
            get { return _msg; }
        }
        private bool _IsStop;
        public bool IsStop
        {
            get { return _IsStop; }
        }
    }
}
